<!DOCTYPE html>  
<html>  
  <head>  
    <title>For Loop</title>  
  </head>
  <body>  
    <script type="text/javascript">  
       for (i = 0; i < 5; i++) {
         document.write(i);document.write("<br>");
       }
       document.write("<hr>");
       
       for (i = 0; i <= 10; i = i + 2) {
         document.write(i);document.write("<br>");
       }
       document.write("<hr>");
       
       var cars = ["Volvo", "BMW", "Ford", "Mazda"];
       for (var car in cars) {
         document.write(car + " " + cars[car]);document.write("<br>");
       }
    </script> 
  </body>  
</html>